{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Imports\n",
    "\n",
    "Import all the modules and functionalities we need."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "\n",
    "# Import standard libraries.\n",
    "import os\n",
    "\n",
    "# Import third party libraries.\n",
    "import matplotlib.pyplot as plt\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from scipy.stats import stats\n",
    "import seaborn as sns\n",
    "from statsmodels.stats.multitest import multipletests\n",
    "\n",
    "# Import custom libraries/scripts.\n",
    "import annotations\n",
    "import helpers"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Loading data\n",
    "\n",
    "Fetch all our relevant data for the current analysis."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set working contants.\n",
    "EXPERIMENTS_PATH = r'E:\\Miguel\\PhD\\Results\\Competition\\DL\\Four-Arena Setup\\WT_mating_status\\processed'\n",
    "FPS = 60\n",
    "N_MINUTES = 60\n",
    "N_FRAMES = N_MINUTES * 60 * FPS\n",
    "INK = 'black'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set figure configurations.\n",
    "sns.set(\n",
    "        context='paper',\n",
    "        style='ticks',\n",
    "        font='sans-serif',\n",
    "        font_scale=1.0, \n",
    "        rc={\n",
    "            'axes.axisbelow': True,\n",
    "            'axes.edgecolor': INK,\n",
    "            'axes.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'axes.grid': False,\n",
    "            'axes.labelcolor': INK,\n",
    "            'axes.labelsize': 13.0,\n",
    "            'axes.labelweight': 'normal',\n",
    "            'axes.linewidth': 1.0,\n",
    "            'axes.spines.left': True,\n",
    "            'axes.spines.bottom': True,\n",
    "            'axes.spines.top': False,\n",
    "            'axes.spines.right': False,\n",
    "            'axes.titlepad': 15.0,\n",
    "            'axes.titlesize': 20.0,\n",
    "            'axes.titleweight': 'bold',\n",
    "            'figure.facecolor': 'white' if INK=='black' else 'black',\n",
    "            'figure.figsize': [6.0, 4.0],\n",
    "            'figure.titlesize': 30.0,\n",
    "            'figure.titleweight': 'bold',\n",
    "            'font.family': ['sans-serif'],\n",
    "            'font.sans-serif': ['Arial'],\n",
    "            'legend.frameon': False,\n",
    "            'legend.fontsize': 11.0,\n",
    "            'lines.color': INK,\n",
    "            'lines.linewidth': 1.0,\n",
    "            'patch.edgecolor': INK,\n",
    "            'savefig.dpi': 300,\n",
    "            'savefig.format': 'png',\n",
    "            'savefig.bbox': 'tight',\n",
    "            'savefig.transparent': True,\n",
    "            'text.color': INK,\n",
    "            'text.usetex': False,\n",
    "            'xtick.color': INK,\n",
    "            'xtick.direction': 'out',\n",
    "            'xtick.labelsize': 12.0,\n",
    "            'xtick.major.pad': 5.0,\n",
    "            'xtick.major.size': 0.0,\n",
    "            'xtick.major.width': 1.0,\n",
    "            'xtick.minor.size': 0.0,\n",
    "            'xtick.minor.width': 0.4,\n",
    "            'ytick.color': INK,\n",
    "            'ytick.direction': 'out',\n",
    "            'ytick.labelsize': 12.0,\n",
    "            'ytick.major.pad': 5.0,\n",
    "            'ytick.major.size': 3.0,\n",
    "            'ytick.major.width': 1.0,\n",
    "            'ytick.minor.size': 0.0,\n",
    "            'ytick.minor.width': 0.4\n",
    "           }\n",
    "       )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Folder already exists, skipping.\n"
     ]
    }
   ],
   "source": [
    "# Prepare the Figures folder to save our graphs in.\n",
    "savepath = os.path.join(r'C:\\Users\\Miguel\\Desktop\\paper_data', 'paper_figures', 'figureS2')\n",
    "try:\n",
    "    os.makedirs(savepath)\n",
    "    print('New folder created.')\n",
    "except FileExistsError:\n",
    "    print('Folder already exists, skipping.')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Paths to conditions:\n",
      " ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h', '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin']\n"
     ]
    }
   ],
   "source": [
    "# Set the conditions to analyze.\n",
    "condition_order = ['virgin_virgin', 'virgin_mated24h', 'virgin_mated2h', 'virgin_added']\n",
    "conditions = [item.path for item in os.scandir(EXPERIMENTS_PATH) if item.name in condition_order]\n",
    "print('Paths to conditions:\\n', conditions)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['video_2017-09-07T13_28_02_arena2_slice1', 'video_2017-09-27T15_06_20_arena1_slice1', 'video_2017-09-28T14_44_01_arena1_slice1', 'video_2017-10-19T14_58_20_arena2_slice1', 'video_2017-10-26T14_43_16_arena1_slice1', 'video_2017-09-05T14_34_55_arena4', 'video_2017-09-12T14_36_55_arena4', 'video_2017-09-14T13_34_41_arena2', 'video_2017-09-21T14_47_10_arena3', 'video_2017-09-21T14_47_10_arena4', 'video_2017-09-26T13_40_19_arena4', 'video_2017-09-27T16_21_07_arena1', 'video_2017-09-27T16_21_07_arena3', 'video_2017-09-28T15_55_49_arena2', 'video_2017-10-12T14_34_41_arena2', 'video_2017-10-18T14_05_05_arena3', 'video_2017-10-19T14_58_20_arena1', 'video_2017-10-24T14_48_34_arena1', 'video_2017-10-24T14_48_34_arena4', 'video_2017-10-25T13_39_35_arena4', 'video_2017-11-03T14_54_45_arena2', 'video_2017-09-05T15_42_04_arena1', 'video_2017-11-02T16_11_06_arena1', 'video_2017-12-19T16_23_33_arena4', 'video_2017-09-05T15_42_04_arena3', 'video_2017-09-07T13_28_02_arena4']\n",
      "26\n"
     ]
    }
   ],
   "source": [
    "# Create a list of all the experiments that we DO NOT want to analyze.\n",
    "intruders = []\n",
    "for condition_path in conditions:\n",
    "    condition = os.path.basename(condition_path)\n",
    "    for file in os.listdir(condition_path):\n",
    "        if 'quality_control' in file:\n",
    "\n",
    "            # Read the quality.csv file to check which experiments are usable for analysis.\n",
    "            quality_file = os.path.join(condition_path, file)\n",
    "            quality_df = pd.read_csv(quality_file, usecols=[0,1], index_col=0)\n",
    "            quality_df = quality_df[quality_df['is_usable'] == False].index.values\n",
    "\n",
    "            for value in quality_df:\n",
    "                intruders.append(value + '_slice1' if condition=='virgin_added' else value)\n",
    "\n",
    "print(intruders)             \n",
    "print(len(intruders))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\t\n",
      " virgin_added\n",
      "\t\n",
      " virgin_mated24h\n",
      "Copulation too short: video_2017-09-20T14_48_55_arena3\n",
      "\t\n",
      " virgin_mated2h\n",
      "\t\n",
      " virgin_virgin\n",
      "Copulation too short: video_2017-09-06T13_42_13_arena3\n",
      "Copulation too short: video_2017-09-26T14_52_18_arena3\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_virgin': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T13_28_41_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-05T14_34_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T13_42_13_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-06T14_45_32_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-07T14_37_38_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-08T13_26_13_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T13_30_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T14_36_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-12T16_18_15_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-13T14_34_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T13_43_53_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-20T14_48_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T13_38_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-21T15_57_23_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-26T13_40_19_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T13_36_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T14_44_01_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-09-28T15_55_49_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-12T15_50_43_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-13T16_06_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-18T15_19_17_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-19T13_50_56_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T13_21_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-20T15_44_09_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-24T16_13_35_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-10-25T14_55_12_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T13_37_48_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T14_48_28_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-02T16_11_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T14_54_45_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-11-03T16_20_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T12_58_51_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_virgin\\\\video_2017-12-20T14_01_01_arena3'],\n",
       " 'virgin_mated24h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-05T13_28_41_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-07T16_01_26_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-08T14_31_59_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-12T13_30_06_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-13T15_40_03_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-14T14_47_16_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-20T13_43_53_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-26T14_52_18_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-09-27T15_06_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T13_30_05_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-11T16_00_50_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-13T14_37_35_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T13_50_56_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T14_58_20_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-19T16_19_37_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-20T14_31_24_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-24T13_43_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T13_39_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-25T14_55_12_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T13_35_36_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-10-26T14_43_16_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T13_38_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated24h\\\\video_2017-11-03T16_20_50_arena3'],\n",
       " 'virgin_mated2h': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-06T15_53_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-07T16_01_26_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-08T15_42_18_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-13T15_40_03_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-14T15_53_40_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-20T16_07_55_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-21T15_57_23_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-26T16_06_31_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-09-28T15_55_49_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-11T16_00_50_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-12T15_50_43_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-13T16_06_33_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-18T16_37_02_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-19T16_19_37_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-10-25T16_23_26_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-11-02T16_11_06_arena4',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T15_13_55_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-19T16_23_33_arena3',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_mated2h\\\\video_2017-12-20T15_08_53_arena2'],\n",
       " 'virgin_added': ['\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-05T13_28_41_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-05T13_28_41_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T13_42_13_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T14_45_32_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-06T14_45_32_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-08T13_26_13_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-08T13_26_13_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T14_36_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T16_18_15_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-12T16_18_15_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-13T13_31_57_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-20T16_07_55_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-20T16_07_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-21T13_38_55_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-21T14_47_10_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-09-26T16_06_31_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-11T14_44_35_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-11T14_44_35_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-12T13_31_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-13T13_32_39_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-18T16_37_02_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-18T16_37_02_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-19T13_50_56_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-20T14_31_24_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-20T14_31_24_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T14_43_16_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T16_04_34_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-10-26T16_04_34_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-11-02T14_48_28_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-11-02T14_48_28_arena2',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-12-20T12_58_51_arena1',\n",
       "  '\\\\\\\\10.40.12.80\\\\home\\\\PhD\\\\Results\\\\Competition\\\\DL\\\\Four-Arena Setup\\\\WT_mating_status\\\\processed\\\\virgin_added\\\\video_2017-12-20T14_01_01_arena2']}"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Load all usable experiments for each condition.\n",
    "experiments = {condition: [] for condition in condition_order}\n",
    "\n",
    "for condition_path in conditions:\n",
    "    \n",
    "    condition = os.path.basename(condition_path)\n",
    "    print('\\t\\n', condition)\n",
    "    \n",
    "    for item in os.scandir(condition_path):\n",
    "        if item.is_dir() and item.name not in intruders:\n",
    "            \n",
    "            annotation_video = annotations.read(item.path.split('_slice')[0] + '.csv')\n",
    "            \n",
    "            try:\n",
    "                copulation = annotation_video[0].events[0]\n",
    "\n",
    "                # Filter out videos where copulation is interrupted.\n",
    "                copulation_end = copulation.time_interval[1]\n",
    "                if copulation_end==N_FRAMES:\n",
    "                    print('Copulation interrupted:', item.name)\n",
    "                    continue\n",
    "\n",
    "                # Filter out videos where copulation lasts less than 8 minutes.\n",
    "                copulation_duration = copulation.duration\n",
    "                if copulation_duration <= 8 * 60 * FPS:\n",
    "                    print('Copulation too short:', item.name)\n",
    "                    continue\n",
    "            \n",
    "            except IndexError as error:\n",
    "                continue\n",
    "\n",
    "            experiments[condition].append(item.path.split('_slice')[0])\n",
    "\n",
    "experiments"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Aggression Analysis"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-05T14_34_55_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-06T13_42_13_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-06T14_45_32_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-07T14_37_38_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-07T14_37_38_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-08T13_26_13_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-12T13_30_06_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-12T14_36_55_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-12T14_36_55_arena3\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-12T16_18_15_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-13T14_34_18_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-20T13_43_53_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-20T13_43_53_arena3\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-20T14_48_55_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-09-21T13_38_55_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-09-21T15_57_23_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-09-26T13_40_19_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-09-28T13_36_06_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-28T13_36_06_arena4\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-09-28T14_44_01_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-09-28T15_55_49_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-09-28T15_55_49_arena3\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-12T15_50_43_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-12T15_50_43_arena2\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-13T16_06_33_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-13T16_06_33_arena2\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-18T15_19_17_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-19T13_50_56_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena2\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-20T13_21_06_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-20T15_44_09_arena2 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-24T16_13_35_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-10-25T14_55_12_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-11-02T13_37_48_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-02T14_48_28_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-02T16_11_06_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-11-03T14_54_45_arena1 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "No aggression for experiment video_2017-11-03T14_54_45_arena1\n",
      "Iteration: 31 \n",
      "Experiment: video_2017-11-03T16_20_50_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 32 \n",
      "Experiment: video_2017-12-20T12_58_51_arena4 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 33 \n",
      "Experiment: video_2017-12-20T14_01_01_arena3 \n",
      "Condition: virgin_virgin \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-05T13_28_41_arena3\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-07T16_01_26_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-07T16_01_26_arena4\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-08T14_31_59_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-08T14_31_59_arena2\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-08T14_31_59_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-12T13_30_06_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-13T15_40_03_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-14T14_47_16_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-14T14_47_16_arena4\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-20T13_43_53_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-20T13_43_53_arena1\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-26T14_52_18_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-27T15_06_20_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-09-27T15_06_20_arena3\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-10-11T13_30_05_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T13_30_05_arena1\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-10-11T16_00_50_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena4\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-10-13T14_37_35_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena1\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-10-13T14_37_35_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena2\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-10-13T14_37_35_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T14_37_35_arena3\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-10-19T13_50_56_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena4\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-19T14_58_20_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-19T14_58_20_arena3\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-19T16_19_37_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-20T14_31_24_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-20T14_31_24_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-20T14_31_24_arena4\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-24T13_43_26_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-24T13_43_26_arena3\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-25T13_39_35_arena1 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-25T14_55_12_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-25T14_55_12_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-10-25T14_55_12_arena3\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-26T13_35_36_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-26T14_43_16_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-11-03T13_38_06_arena2 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-11-03T13_38_06_arena2\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-11-03T13_38_06_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "No aggression for experiment video_2017-11-03T13_38_06_arena3\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-03T13_38_06_arena4 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-03T16_20_50_arena3 \n",
      "Condition: virgin_mated24h \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-06T15_53_34_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-06T15_53_34_arena1\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-07T16_01_26_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-07T16_01_26_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-08T15_42_18_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-08T15_42_18_arena1\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-08T15_42_18_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-13T15_40_03_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-14T15_53_40_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-14T15_53_40_arena3\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-20T16_07_55_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-20T16_07_55_arena4\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-21T15_57_23_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-21T15_57_23_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-26T16_06_31_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena1\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-26T16_06_31_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena3\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-28T15_55_49_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-09-28T15_55_49_arena1\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-10-11T16_00_50_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena1\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-10-11T16_00_50_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena2\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-10-11T16_00_50_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-11T16_00_50_arena3\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-12T15_50_43_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-12T15_50_43_arena4\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-13T16_06_33_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-13T16_06_33_arena4\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-18T16_37_02_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-18T16_37_02_arena3\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-18T16_37_02_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-19T16_19_37_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-19T16_19_37_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-25T16_23_26_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-25T16_23_26_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-10-25T16_23_26_arena3\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-11-02T16_11_06_arena4 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "No aggression for experiment video_2017-11-02T16_11_06_arena4\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-12-19T15_13_55_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-12-19T15_13_55_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-12-19T16_23_33_arena1 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-12-19T16_23_33_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-12-19T16_23_33_arena3 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-12-20T15_08_53_arena2 \n",
      "Condition: virgin_mated2h \n",
      "\n",
      "Iteration: 0 \n",
      "Experiment: video_2017-09-05T13_28_41_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 1 \n",
      "Experiment: video_2017-09-05T13_28_41_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 2 \n",
      "Experiment: video_2017-09-06T13_42_13_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-06T13_42_13_arena2\n",
      "Iteration: 3 \n",
      "Experiment: video_2017-09-06T14_45_32_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 4 \n",
      "Experiment: video_2017-09-06T14_45_32_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 5 \n",
      "Experiment: video_2017-09-08T13_26_13_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 6 \n",
      "Experiment: video_2017-09-08T13_26_13_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 7 \n",
      "Experiment: video_2017-09-12T14_36_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 8 \n",
      "Experiment: video_2017-09-12T16_18_15_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 9 \n",
      "Experiment: video_2017-09-12T16_18_15_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 10 \n",
      "Experiment: video_2017-09-13T13_31_57_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 11 \n",
      "Experiment: video_2017-09-20T16_07_55_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 12 \n",
      "Experiment: video_2017-09-20T16_07_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 13 \n",
      "Experiment: video_2017-09-21T13_38_55_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-21T13_38_55_arena2\n",
      "Iteration: 14 \n",
      "Experiment: video_2017-09-21T14_47_10_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-21T14_47_10_arena1\n",
      "Iteration: 15 \n",
      "Experiment: video_2017-09-26T16_06_31_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-09-26T16_06_31_arena2\n",
      "Iteration: 16 \n",
      "Experiment: video_2017-10-11T14_44_35_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 17 \n",
      "Experiment: video_2017-10-11T14_44_35_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-11T14_44_35_arena2\n",
      "Iteration: 18 \n",
      "Experiment: video_2017-10-12T13_31_34_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 19 \n",
      "Experiment: video_2017-10-13T13_32_39_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-13T13_32_39_arena1\n",
      "Iteration: 20 \n",
      "Experiment: video_2017-10-18T16_37_02_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-18T16_37_02_arena1\n",
      "Iteration: 21 \n",
      "Experiment: video_2017-10-18T16_37_02_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 22 \n",
      "Experiment: video_2017-10-19T13_50_56_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-19T13_50_56_arena1\n",
      "Iteration: 23 \n",
      "Experiment: video_2017-10-20T14_31_24_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-20T14_31_24_arena1\n",
      "Iteration: 24 \n",
      "Experiment: video_2017-10-20T14_31_24_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 25 \n",
      "Experiment: video_2017-10-26T14_43_16_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "Iteration: 26 \n",
      "Experiment: video_2017-10-26T16_04_34_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-26T16_04_34_arena1\n",
      "Iteration: 27 \n",
      "Experiment: video_2017-10-26T16_04_34_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-10-26T16_04_34_arena2\n",
      "Iteration: 28 \n",
      "Experiment: video_2017-11-02T14_48_28_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-11-02T14_48_28_arena1\n",
      "Iteration: 29 \n",
      "Experiment: video_2017-11-02T14_48_28_arena2 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-11-02T14_48_28_arena2\n",
      "Iteration: 30 \n",
      "Experiment: video_2017-12-20T12_58_51_arena1 \n",
      "Condition: virgin_added \n",
      "\n",
      "No aggression for experiment video_2017-12-20T12_58_51_arena1\n",
      "Iteration: 31 \n",
      "Experiment: video_2017-12-20T14_01_01_arena2 \n",
      "Condition: virgin_added \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>has_aggression</th>\n",
       "      <th>latency</th>\n",
       "      <th>latency_mins</th>\n",
       "      <th>nframes</th>\n",
       "      <th>nbouts</th>\n",
       "      <th>ratio_frames</th>\n",
       "      <th>ratio_bouts</th>\n",
       "      <th>second_female</th>\n",
       "      <th>second_fly_delay</th>\n",
       "      <th>condition</th>\n",
       "      <th>experiment</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>True</td>\n",
       "      <td>31444.0</td>\n",
       "      <td>8.734444</td>\n",
       "      <td>180</td>\n",
       "      <td>1</td>\n",
       "      <td>0.010000</td>\n",
       "      <td>0.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T13_28_41_arena4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>True</td>\n",
       "      <td>853.0</td>\n",
       "      <td>0.236944</td>\n",
       "      <td>617</td>\n",
       "      <td>10</td>\n",
       "      <td>0.034278</td>\n",
       "      <td>2.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-05T14_34_55_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>True</td>\n",
       "      <td>11456.0</td>\n",
       "      <td>3.182222</td>\n",
       "      <td>343</td>\n",
       "      <td>6</td>\n",
       "      <td>0.019056</td>\n",
       "      <td>1.2</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T13_42_13_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>True</td>\n",
       "      <td>3703.0</td>\n",
       "      <td>1.028611</td>\n",
       "      <td>950</td>\n",
       "      <td>13</td>\n",
       "      <td>0.052778</td>\n",
       "      <td>2.6</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-06T14_45_32_arena3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>True</td>\n",
       "      <td>12260.0</td>\n",
       "      <td>3.405556</td>\n",
       "      <td>579</td>\n",
       "      <td>7</td>\n",
       "      <td>0.032167</td>\n",
       "      <td>1.4</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>video_2017-09-07T14_37_38_arena3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.611944</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-10-26T16_04_34_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>123</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>3.442222</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-11-02T14_48_28_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>124</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>9.632500</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-11-02T14_48_28_arena2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0</td>\n",
       "      <td>0</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>0.0</td>\n",
       "      <td>0</td>\n",
       "      <td>5.978611</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-12-20T12_58_51_arena1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>True</td>\n",
       "      <td>23537.0</td>\n",
       "      <td>6.538056</td>\n",
       "      <td>10</td>\n",
       "      <td>2</td>\n",
       "      <td>0.000556</td>\n",
       "      <td>0.4</td>\n",
       "      <td>82628</td>\n",
       "      <td>3.328056</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>video_2017-12-20T14_01_01_arena2</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>127 rows × 11 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "     has_aggression  latency  latency_mins  nframes  nbouts  ratio_frames  \\\n",
       "0              True  31444.0      8.734444      180       1      0.010000   \n",
       "1              True    853.0      0.236944      617      10      0.034278   \n",
       "2              True  11456.0      3.182222      343       6      0.019056   \n",
       "3              True   3703.0      1.028611      950      13      0.052778   \n",
       "4              True  12260.0      3.405556      579       7      0.032167   \n",
       "..              ...      ...           ...      ...     ...           ...   \n",
       "122           False      NaN      0.000000        0       0      0.000000   \n",
       "123           False      NaN      0.000000        0       0      0.000000   \n",
       "124           False      NaN      0.000000        0       0      0.000000   \n",
       "125           False      NaN      0.000000        0       0      0.000000   \n",
       "126            True  23537.0      6.538056       10       2      0.000556   \n",
       "\n",
       "     ratio_bouts  second_female  second_fly_delay      condition  \\\n",
       "0            0.2              0          0.000000  virgin_virgin   \n",
       "1            2.0              0          0.000000  virgin_virgin   \n",
       "2            1.2              0          0.000000  virgin_virgin   \n",
       "3            2.6              0          0.000000  virgin_virgin   \n",
       "4            1.4              0          0.000000  virgin_virgin   \n",
       "..           ...            ...               ...            ...   \n",
       "122          0.0              0          0.611944   virgin_added   \n",
       "123          0.0              0          3.442222   virgin_added   \n",
       "124          0.0              0          9.632500   virgin_added   \n",
       "125          0.0              0          5.978611   virgin_added   \n",
       "126          0.4          82628          3.328056   virgin_added   \n",
       "\n",
       "                           experiment  \n",
       "0    video_2017-09-05T13_28_41_arena4  \n",
       "1    video_2017-09-05T14_34_55_arena2  \n",
       "2    video_2017-09-06T13_42_13_arena1  \n",
       "3    video_2017-09-06T14_45_32_arena3  \n",
       "4    video_2017-09-07T14_37_38_arena3  \n",
       "..                                ...  \n",
       "122  video_2017-10-26T16_04_34_arena2  \n",
       "123  video_2017-11-02T14_48_28_arena1  \n",
       "124  video_2017-11-02T14_48_28_arena2  \n",
       "125  video_2017-12-20T12_58_51_arena1  \n",
       "126  video_2017-12-20T14_01_01_arena2  \n",
       "\n",
       "[127 rows x 11 columns]"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "aggression_df = pd.DataFrame()\n",
    "\n",
    "for condition in condition_order:\n",
    "    for h, experiment_path in enumerate(experiments[condition]):\n",
    "\n",
    "        experiment = os.path.basename(experiment_path)\n",
    "        \n",
    "        print('Iteration:', h, '\\nExperiment:', experiment, '\\nCondition:', condition, '\\n')\n",
    "        \n",
    "        # Read .csv annotation files.\n",
    "        annotation_video = annotations.read(experiment_path + '.csv')\n",
    "        copulation = annotation_video[0].events[0]\n",
    "        aggression_events = annotation_video[1].events\n",
    "        n_events = len(aggression_events)\n",
    "\n",
    "        # In case there is aggression, do the necessary calculations.\n",
    "        if n_events > 0:\n",
    "\n",
    "            if condition=='virgin_added':\n",
    "                new_fly = annotation_video[2].events[0].time\n",
    "                latency =  aggression_events[0].time - new_fly\n",
    "                latency_mins = latency / (60 * FPS)\n",
    "                ratio_frames = sum([aggression.duration for aggression in aggression_events]) / (5 * 60 * FPS)\n",
    "                ratio_bouts = n_events / 5\n",
    "                delay = (new_fly - copulation.time) / (60 * FPS)\n",
    "            else:\n",
    "                new_fly = 0\n",
    "                latency =  aggression_events[0].time - copulation.time\n",
    "                latency_mins = latency / (60 * FPS)\n",
    "                ratio_frames = sum([aggression.duration for aggression in aggression_events]) / (5 * 60 * FPS)\n",
    "                ratio_bouts = n_events / 5\n",
    "                delay = 0\n",
    "\n",
    "            aggression_data = pd.DataFrame({'has_aggression': True,\n",
    "                                            'latency': latency,\n",
    "                                            'latency_mins': latency_mins,\n",
    "                                            'nframes': sum([aggression.duration for aggression in aggression_events]),\n",
    "                                            'nbouts': n_events,\n",
    "                                            'ratio_frames': ratio_frames,\n",
    "                                            'ratio_bouts': ratio_bouts,\n",
    "                                            'second_female': new_fly,\n",
    "                                            'second_fly_delay': delay,\n",
    "                                            'condition': condition,\n",
    "                                            'experiment': experiment},\n",
    "                                            index=[h],\n",
    "                                           )\n",
    "\n",
    "        # If not, preset our dictionary with default values.\n",
    "        else:\n",
    "            print('No aggression for experiment', experiment)\n",
    "            if condition=='virgin_added':\n",
    "                new_fly = annotation_video[2].events[0].time\n",
    "                delay = (new_fly - copulation.time) / (60 * FPS)\n",
    "            else:\n",
    "                delay = 0\n",
    "\n",
    "            aggression_data = pd.DataFrame({'has_aggression': False,\n",
    "                                            'latency': np.nan,\n",
    "                                            'latency_mins': 0,\n",
    "                                            'nframes': 0,\n",
    "                                            'nbouts': 0,\n",
    "                                            'ratio_frames': 0, \n",
    "                                            'ratio_bouts': 0,\n",
    "                                            'second_female': 0,\n",
    "                                            'second_fly_delay': delay,\n",
    "                                            'condition': condition,\n",
    "                                            'experiment': experiment},\n",
    "                                            index=[h],\n",
    "                                           )\n",
    "\n",
    "        # Concatenate all data together.\n",
    "        aggression_df = pd.concat([aggression_df, aggression_data], ignore_index=True)\n",
    "\n",
    "aggression_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>n_aggression</th>\n",
       "      <th>n_experiments</th>\n",
       "      <th>aggression_rate</th>\n",
       "      <th>condition</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>26</td>\n",
       "      <td>34</td>\n",
       "      <td>0.764706</td>\n",
       "      <td>virgin_virgin</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>12</td>\n",
       "      <td>30</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>16</td>\n",
       "      <td>31</td>\n",
       "      <td>0.516129</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>18</td>\n",
       "      <td>32</td>\n",
       "      <td>0.562500</td>\n",
       "      <td>virgin_added</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "   n_aggression  n_experiments  aggression_rate        condition\n",
       "0            26             34         0.764706    virgin_virgin\n",
       "1            12             30         0.400000  virgin_mated24h\n",
       "2            16             31         0.516129   virgin_mated2h\n",
       "3            18             32         0.562500     virgin_added"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Re-arrange original aggression DataFrame to get aggression rate.\n",
    "aggression_rate_df = pd.DataFrame()\n",
    "has_aggression_list = []\n",
    "for condition in condition_order:\n",
    "    \n",
    "    aggression_column = aggression_df[aggression_df['condition']==condition]\n",
    "    n_exp = aggression_column.shape[0]\n",
    "    \n",
    "    if condition=='single_pair' or condition=='male_competition':\n",
    "        rate_data = pd.DataFrame({'n_aggression': 0,\n",
    "                                  'n_experiments': n_exp,\n",
    "                                  'aggression_rate': 0,\n",
    "                                  'condition': condition,\n",
    "                                 }, index=[0])\n",
    "    \n",
    "    else:\n",
    "        has_aggression = aggression_column[aggression_column['has_aggression']==True]\n",
    "        n_aggression = has_aggression.shape[0]\n",
    "        has_aggression_list.append(n_aggression)\n",
    "        aggression_rate = n_aggression / n_exp\n",
    "        rate_data = pd.DataFrame({'n_aggression': n_aggression,\n",
    "                                  'n_experiments': n_exp,\n",
    "                                  'aggression_rate': aggression_rate,\n",
    "                                  'condition': condition,\n",
    "                                 }, index=[0])\n",
    "        \n",
    "    aggression_rate_df = pd.concat([aggression_rate_df, rate_data], ignore_index=True)\n",
    "\n",
    "aggression_rate_df = aggression_rate_df[['n_aggression', 'n_experiments', 'aggression_rate', 'condition']]\n",
    "aggression_rate_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Does aggression occur during courtship, during copulation, or both?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>n_aggression</th>\n",
       "      <th>n_experiments</th>\n",
       "      <th>aggression_rate</th>\n",
       "      <th>condition</th>\n",
       "      <th>time</th>\n",
       "      <th>observed_occurence</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0</td>\n",
       "      <td>34</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>during_first_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>during_first_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0</td>\n",
       "      <td>31</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>during_first_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0</td>\n",
       "      <td>32</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>during_first_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>26</td>\n",
       "      <td>34</td>\n",
       "      <td>0.764706</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>during_first_copulation</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>12</td>\n",
       "      <td>30</td>\n",
       "      <td>0.400000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>during_first_copulation</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>16</td>\n",
       "      <td>31</td>\n",
       "      <td>0.516129</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>during_first_copulation</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>18</td>\n",
       "      <td>32</td>\n",
       "      <td>0.562500</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>during_first_copulation</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0</td>\n",
       "      <td>34</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>during_second_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>during_second_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>0</td>\n",
       "      <td>31</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>during_second_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>0</td>\n",
       "      <td>32</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>during_second_courtship</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>0</td>\n",
       "      <td>34</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>during_second_copulation</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>0</td>\n",
       "      <td>30</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated24h</td>\n",
       "      <td>during_second_copulation</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>0</td>\n",
       "      <td>31</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_mated2h</td>\n",
       "      <td>during_second_copulation</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>0</td>\n",
       "      <td>32</td>\n",
       "      <td>0.000000</td>\n",
       "      <td>virgin_added</td>\n",
       "      <td>during_second_copulation</td>\n",
       "      <td>0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "    n_aggression  n_experiments  aggression_rate        condition  \\\n",
       "0              0             34         0.000000    virgin_virgin   \n",
       "1              0             30         0.000000  virgin_mated24h   \n",
       "2              0             31         0.000000   virgin_mated2h   \n",
       "3              0             32         0.000000     virgin_added   \n",
       "4             26             34         0.764706    virgin_virgin   \n",
       "5             12             30         0.400000  virgin_mated24h   \n",
       "6             16             31         0.516129   virgin_mated2h   \n",
       "7             18             32         0.562500     virgin_added   \n",
       "8              0             34         0.000000    virgin_virgin   \n",
       "9              0             30         0.000000  virgin_mated24h   \n",
       "10             0             31         0.000000   virgin_mated2h   \n",
       "11             0             32         0.000000     virgin_added   \n",
       "12             0             34         0.000000    virgin_virgin   \n",
       "13             0             30         0.000000  virgin_mated24h   \n",
       "14             0             31         0.000000   virgin_mated2h   \n",
       "15             0             32         0.000000     virgin_added   \n",
       "\n",
       "                        time  observed_occurence  \n",
       "0     during_first_courtship                   0  \n",
       "1     during_first_courtship                   0  \n",
       "2     during_first_courtship                   0  \n",
       "3     during_first_courtship                   0  \n",
       "4    during_first_copulation                   1  \n",
       "5    during_first_copulation                   1  \n",
       "6    during_first_copulation                   1  \n",
       "7    during_first_copulation                   1  \n",
       "8    during_second_courtship                   0  \n",
       "9    during_second_courtship                   0  \n",
       "10   during_second_courtship                   0  \n",
       "11   during_second_courtship                   0  \n",
       "12  during_second_copulation                   0  \n",
       "13  during_second_copulation                   0  \n",
       "14  during_second_copulation                   0  \n",
       "15  during_second_copulation                   0  "
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "first_copulation_aggression = aggression_rate_df.copy()\n",
    "first_copulation_aggression['time'] = 'during_first_copulation'\n",
    "\n",
    "first_courtship_aggression = first_copulation_aggression.copy()\n",
    "first_courtship_aggression['n_aggression'] = 0\n",
    "first_courtship_aggression['aggression_rate'] = 0\n",
    "first_courtship_aggression['time'] = 'during_first_courtship'\n",
    "\n",
    "second_courtship_aggression = first_copulation_aggression.copy()\n",
    "second_courtship_aggression['n_aggression'] = 0\n",
    "second_courtship_aggression['aggression_rate'] = 0\n",
    "second_courtship_aggression['time'] = 'during_second_courtship'\n",
    "\n",
    "second_copulation_aggression = first_copulation_aggression.copy()\n",
    "second_copulation_aggression['n_aggression'] = 0\n",
    "second_copulation_aggression['aggression_rate'] = 0\n",
    "second_copulation_aggression['time'] = 'during_second_copulation'\n",
    "\n",
    "aggression_timing_df = pd.concat([first_courtship_aggression, first_copulation_aggression, second_courtship_aggression, second_copulation_aggression], ignore_index=True)\n",
    "aggression_timing_df['observed_occurence'] = aggression_timing_df['n_aggression'].apply(lambda x: 0 if x==0 else 1)\n",
    "\n",
    "aggression_timing_df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAVEAAAEdCAYAAAC17FRVAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzde1yO9/8H8NedioSEpVonKaXSuUR0kkMhySGbQzmW44Y5jKHy3YZt2MQaJiw05LQxxpRtpqNSsRRKJTWnkJQOn98f/bqV7vt2d7gP7vv9fDx6bN333X2970versPrel8cxhgDIYSQFlGQdAGEEPIuoyZKCCGtQE2UEEJagZooIYS0AjVRQghpBWqihBDSCmJroowxBAQE4OuvvwYA1NTU4OOPP4apqSmMjIwQERHBfW1OTg5cXFxgZmYGR0dHZGVliatMQghpFrE00X///RdDhgzB0aNHuY/98MMPyM7ORmZmJpKSkrB161YkJiYCACZPnozg4GDcuHEDoaGhGD9+PISJs3I4HJF9BkII4UUsTXT79u2YNWsWJkyYwH3s+PHjmD59OhQVFaGuro5JkyYhKioK9+7dQ1ZWFiZNmgQA8PLyQllZGVJTU8VRKiGENItYmmh4eDg+/PDDRo8VFBRAV1eX+72Ojg4KCwtRUFAAbW1tKCgoNHmOEEKkjcROLNXW1jba/WaMoV27dk0eb/gcLyEhIeBwOLQrTwiRCIk1UT09PRQVFXG/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wQEBODp06cYM2YMzM3NMXr0aNjY2CAvLw979+7lXq5pYGCANWvWwNHREebm5khJSZHQJ6MmSggRg6lTp3KvZMrJyUFFRQV3zixQN83r4sWL2LdvH8LCwmBiYoLr169j3bp1yMjI4Pme3bt3R2JiIoKDg/HFF1+I5XPwQk2UECJyI0eOxJUrVxoNNm/ozcHmU6dOBSD8YPPHjx+LsHrBqIkSQkROlgebUxMlhIiFrA42p8s+CSFiIauDzSniRAiRKu/aYHPaEiWESJV3bbA5bYkSQkgrSG97J+T/2qljGgAAAIZB/l1PRK8lIAI4IFGAQKIAwQDuPL46Q8M/XQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Initialize figure.\n",
    "n_conditions = aggression_timing_df['condition'].nunique()\n",
    "figure, axis = plt.subplots(figsize=(1.25*n_conditions, 4))\n",
    "\n",
    "# Draw the barplot.\n",
    "sns.barplot(x='condition',\n",
    "            y='aggression_rate',\n",
    "            data=aggression_timing_df,\n",
    "            order=condition_order,\n",
    "            hue='time',\n",
    "            hue_order=['during_first_courtship', 'during_first_copulation', 'during_second_courtship', 'during_second_copulation'],\n",
    "            edgecolor=INK\n",
    "           )\n",
    "\n",
    "# Format barplot grouping colors and hatching.\n",
    "for b, barplot in enumerate(axis.patches):\n",
    "    if b == 0 or b == 4:\n",
    "        barplot.set_facecolor('steelblue')\n",
    "    elif b == 1 or b == 5:\n",
    "        barplot.set_facecolor('#d72323')\n",
    "    elif b == 2 or b == 6:\n",
    "        barplot.set_facecolor('#fB929e')\n",
    "    else:\n",
    "        barplot.set_facecolor('#1a535c')\n",
    "    barplot.set_hatch('///')\n",
    "\n",
    "# Figure and axes formatting.\n",
    "axis.set_xlabel('')\n",
    "axis.set_xticklabels([''])\n",
    "axis.set_ylabel('Experiments with Aggression (%)')\n",
    "axis.set_ylim(0, 1.015)\n",
    "axis.set_yticks(np.arange(0, 1+0.1, 0.2))\n",
    "axis.set_yticklabels([int(y*100) for y in axis.get_yticks()])\n",
    "\n",
    "# Legend formatting.\n",
    "first_courtship_rect = mpatches.Patch(facecolor='white',\n",
    "                                      label='During first courtship',\n",
    "                                      linewidth=1.0,\n",
    "                                      edgecolor=INK\n",
    "                                     )\n",
    "\n",
    "first_copulation_rect = mpatches.Patch(facecolor='white',\n",
    "                                       label='During first copulation',\n",
    "                                       linewidth=1.0,\n",
    "                                       edgecolor=INK,\n",
    "                                       hatch='///'\n",
    "                                      )\n",
    "\n",
    "second_courtship_rect = mpatches.Patch(facecolor='white',\n",
    "                                       label='During second courtship',\n",
    "                                       linewidth=1.0,\n",
    "                                       edgecolor=INK,\n",
    "                                       hatch='...'\n",
    "                                      )\n",
    "\n",
    "second_copulation_rect = mpatches.Patch(facecolor='white',\n",
    "                                        label='During second copulation',\n",
    "                                        linewidth=1.0,\n",
    "                                        edgecolor=INK,\n",
    "                                        hatch='||'\n",
    "                                       )\n",
    "\n",
    "axis.legend(handles=[first_courtship_rect, first_copulation_rect, second_courtship_rect, second_copulation_rect],\n",
    "            title='Time',\n",
    "            title_fontsize=13,\n",
    "            bbox_to_anchor=(1.02, 1.03)\n",
    "           )\n",
    "\n",
    "# Table definition.\n",
    "row1 = [str(exp) for exp in aggression_rate_df['n_experiments'].values]\n",
    "row2 = ['virgin\\n', '24h-mated\\n', '2h-mated\\n', '\\ncourtship-\\n-deprived\\nvirgin\\n']\n",
    "cell_text = np.array([row1, row2])\n",
    "\n",
    "row_labels = ['n =', '']\n",
    "summary_table = axis.table(cellText= cell_text,\n",
    "                           cellLoc='center',\n",
    "                           rowLabels=row_labels,\n",
    "                           rowLoc='center',\n",
    "                           colLoc='center'\n",
    "                          )\n",
    "\n",
    "summary_table.auto_set_font_size(False)\n",
    "summary_table.set_fontsize(11)\n",
    "\n",
    "properties = summary_table.properties()\n",
    "table_cells = properties['children']\n",
    "for cell in table_cells:\n",
    "    cell.set_height(0.12)\n",
    "    cell.set_alpha(0)\n",
    "\n",
    "# Saving parameters.\n",
    "filename = 'aggression_occurrence_during_courtship_copulation_mating_drive'\n",
    "plt.savefig(os.path.join(savepath, filename))\n",
    "\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## How many bouts of aggressive behavior do we observe (normalized)? "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>condition</th>\n",
       "      <th>ratio_bouts</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>0.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>2.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>1.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>2.6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>virgin_virgin</td>\n",
       "      <td>1.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>121</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>122</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>123</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>125</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>126</th>\n",
       "      <td>virgin_added</td>\n",
       "      <td>0.4</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>124 rows × 2 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         condition  ratio_bouts\n",
       "0    virgin_virgin          0.2\n",
       "1    virgin_virgin          2.0\n",
       "2    virgin_virgin          1.2\n",
       "3    virgin_virgin          2.6\n",
       "4    virgin_virgin          1.4\n",
       "..             ...          ...\n",
       "121   virgin_added          0.0\n",
       "122   virgin_added          0.0\n",
       "123   virgin_added          0.0\n",
       "125   virgin_added          0.0\n",
       "126   virgin_added          0.4\n",
       "\n",
       "[124 rows x 2 columns]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ratio_bouts_df = aggression_df.copy()\n",
    "ratio_bouts_df = ratio_bouts_df.query('second_fly_delay<8')\n",
    "ratio_bouts_df = ratio_bouts_df[['condition', 'ratio_bouts']]\n",
    "ratio_bouts_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Statistics"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "\n",
      "\t virgin_mated24h \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS NOT normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.004126\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.00022113941871536945 \n",
      "\n",
      "\n",
      "\t virgin_mated2h \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS NOT normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.013546\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.0031541211260555915 \n",
      "\n",
      "\n",
      "\t virgin_added \n",
      "\n",
      "Shapiro's Test: group 1 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 1 IS NOT normally distributed.\n",
      "Shapiro's Test: group 2 IS NOT normally distributed.\n",
      "D'Agostino's Test: group 2 IS normally distributed.\n",
      "Levene's Test for non-normally distributed samples:\n",
      "  p-value = 0.014741\n",
      "  All groups were sampled from populations with NOT IDENTICAL variances.\n",
      "\n",
      "Mann-Whitney p-value: 0.01637868510543921 \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_mated24h': 0.00022113941871536945,\n",
       " 'virgin_mated2h': 0.0031541211260555915,\n",
       " 'virgin_added': 0.01637868510543921}"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bouts_pvalues = {}\n",
    "\n",
    "control = ratio_bouts_df.query('condition==\"virgin_virgin\"')['ratio_bouts']\n",
    "\n",
    "for condition in condition_order[1:]:\n",
    "        \n",
    "    print('\\n\\t', condition, '\\n')\n",
    "\n",
    "    try:\n",
    "        test = ratio_bouts_df.query('condition==\"' + condition + '\"')['ratio_bouts']\n",
    "\n",
    "        temp_values = {'control': control, 'test': test}\n",
    "\n",
    "        pvalue_condition = helpers.run_statistics(temp_values)\n",
    "\n",
    "        bouts_pvalues[condition] = pvalue_condition\n",
    "        \n",
    "    except ValueError as error:\n",
    "        print(error)\n",
    "\n",
    "bouts_pvalues"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Bonferroni Correction\n",
      "---------------------\n",
      "\n",
      "\tOriginal Values:\n",
      " {'virgin_mated24h': 0.00022113941871536945, 'virgin_mated2h': 0.0031541211260555915, 'virgin_added': 0.01637868510543921}\n",
      "\n",
      "\tCorrected Values:\n",
      " {'virgin_mated24h': 0.0006634182561461084, 'virgin_mated2h': 0.009462363378166774, 'virgin_added': 0.04913605531631763} \n",
      "\n"
     ]
    }
   ],
   "source": [
    "# Bonferroni corretction for multiple comparisons.\n",
    "title = 'Bonferroni Correction'\n",
    "print(title)\n",
    "print('-'*len(title))\n",
    "\n",
    "# Show uncorrected values.\n",
    "print('\\n\\tOriginal Values:\\n', bouts_pvalues)\n",
    "\n",
    "# Apply the bonferroni correction for multiple comparisons.\n",
    "bouts_multi_comp_correction = multipletests(pvals=list(bouts_pvalues.values()), alpha=0.05, method='bonferroni')[1]\n",
    "\n",
    "# Transform the correction results into a dictionary.\n",
    "corrected_bouts_pvalues = dict(zip(list(bouts_pvalues.keys()), bouts_multi_comp_correction))\n",
    "\n",
    "# Show corrected values.\n",
    "print('\\n\\tCorrected Values:\\n', corrected_bouts_pvalues, '\\n')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Effect Size"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "virgin_mated24h\n",
      "Large Efect: -1.0 \n",
      "\n",
      "virgin_mated2h\n",
      "Medium Effect: -0.6666666666666666 \n",
      "\n",
      "virgin_added\n",
      "Medium Effect: -0.6666666666666666 \n",
      "\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "{'virgin_mated24h': -1.0,\n",
       " 'virgin_mated2h': -0.6666666666666666,\n",
       " 'virgin_added': -0.6666666666666666}"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "bouts_effect_sizes = {}\n",
    "\n",
    "control = ratio_bouts_df.query('condition==\"virgin_virgin\"')['ratio_bouts']\n",
    "\n",
    "for condition in condition_order[1:]:\n",
    "    \n",
    "    print(condition)\n",
    "    \n",
    "    test = ratio_bouts_df.query('condition==\"' + condition + '\"')['ratio_bouts']\n",
    "\n",
    "    median_diff = helpers.get_effect_size(control, test, method='median_diff')\n",
    "    \n",
    "    bouts_effect_sizes[condition] = median_diff\n",
    "    \n",
    "bouts_effect_sizes"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Plot"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAUQAAAEgCAYAAADMjwqKAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4yLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+j8jraAAAgAElEQVR4nOzdd3RU1RbA4d+UzKR3SIOQAgFCQu8dFClSBAGRIqgIFmxPfVgBKyKiFAHBxpMqXRFpIt3QQg2BFEJIQuqk92n3/ZEYDSUMyMwEON9aWYvZM5PZ95LsnHPvKTJJkiQEQRAE5NZOQBAEobYQBVEQBKGSKIiCIAiVREEUBEGoJAqiIAhCJVEQBUEQKlm0IG7evBknJydLfqQgCILJZJYahxgXF0f//v1JT0+nqKjIEh8pCIJwSyzSQiwpKWHs2LF88cUXlvg4QRCE22KRgjh58mQmT55M8+bNLfFxgiAIt8XsBXHRokUolUqeeuqpm752xowZy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uv779+/j6tWrKC4uRkNDA0QiUb/vM0uIzyCRSPo0goVhXiW99frn5OSgsLAQp0+fBtDemVZUVASBQICAgADw+XwA4E75o6KiYGVl1WMUkKGhIebPn4/09HSEhYWhrq4OXl5e+Otf/6px/SUlJYiKioKhoSHGjh2rlZqJLCEyDMNJTk5GZmYmgPbJ5UlDr79arcbHH3/MFX6ora3F8OHDkZeXp3HcMdD7GOe4uDisXbsW9fX1WLhw4TPXv2rVKq3fhcDO/xiG4WzcuJHrUZ83b57GXv+goCDs3LkTKpUKTU1N8Pf3R15eHgDg/PnzuHfvHtra2rBv3z6Eh4c/c3s+Pj6orq7G/v37uYTY2/pDQkKQlpYGpVKJ+vp6nDhxot/3nx0hMgyjUW+9/lKpFOXl5RCLxWhtbUVSUhKmT58OuVwOa2trxMfH4969ewgNDcXixYtRVVX1zO3Exsbi5MmTz10/0J6YXVxcMG7cOAgEgn7fZx7RILmTmGGYl5pcLsf69es1joR6WbBTZoZhmA7sCJFhGKYDO0JkGOZXe1WKLLMjRIZhmA7sCJFhmD6JiopCeno699zT0xMWFhaQy+WQy+Xw9vaGp6cnEhIS0NjYiDfeeANCoRBz586FWCzGnTt3sHfvXiQmJgJoLxqxdu1aeHt7QygU4vLlyzraM5YQGYbpo7i4OG4ES3l5ORQKBVcnE2ivenT69Gl89dVX2LhxI/h8PoqLi7Fu3ToUFRVpXOfo0aNx8eJFSKVS/OUvfxmQ/dCEJUSGYfpk9uzZuHDhQrciy109XWQ5Li4OwIsXWf7555+12PpnYwmRYZg+eZWLLLOEyDBMn72qRZbZ0D2GYfrsVS2yzG67YRhGaw4cOIAJEybAz88PlZWVCAwMxK1btwZtXVF2hMgwjNa8bEWW2REiwzBMh8GbqhmGYQYYS4gMwzAdWEJkGIbp8P/E5j1pr8LaKwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 360x288 with 1 Axes>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Initialize figure.\n",
    "n_conditions = ratio_bouts_df['condition'].nunique()\n",
    "figure, axis = plt.subplots(figsize=(1.25*n_conditions, 4))\n",
    "\n",
    "# Draw the boxplot.\n",
    "sns.boxplot(x='condition',\n",
    "            y='ratio_bouts',\n",
    "            data=ratio_bouts_df,\n",
    "            order=condition_order,\n",
    "            palette=['steelblue', '#d72323', '#fB929e', '#1a535c'],\n",
    "            width=0.6,\n",
    "            showfliers=False,\n",
    "            boxprops={'edgecolor': INK},\n",
    "            medianprops={'color': INK},\n",
    "            whiskerprops={'color': INK},\n",
    "            capprops={'color': INK}\n",
    "           )\n",
    "\n",
    "# Draw the swarmplot.\n",
    "sns.swarmplot(x='condition',\n",
    "              y='ratio_bouts',\n",
    "              data=ratio_bouts_df,\n",
    "              order=condition_order,\n",
    "              palette=['steelblue', '#d72323', '#fB929e', '#1a535c'],\n",
    "              linewidth=0.75,\n",
    "              edgecolor=INK\n",
    "             )\n",
    "\n",
    "# Figure and axes formatting.\n",
    "axis.set_xlabel('')\n",
    "axis.set_xticklabels([''])\n",
    "axis.set_ylabel('# Bouts / Minute of Copulation')\n",
    "axis.set_ylim(0, 4)\n",
    "axis.set_yticks(range(0, 4+1, 1))\n",
    "axis.set_yticklabels(range(0, 4+1, 1))\n",
    "\n",
    "# Table definition.\n",
    "row1 = [str(ratio_bouts_df.query('condition==\"'+condition+'\"').shape[0]) for condition in ratio_bouts_df['condition'].unique()]\n",
    "row2 = ['virgin\\n', '24h-mated\\n', '2h-mated\\n', '\\ncourtship-\\n-deprived\\nvirgin\\n'] \n",
    "cell_text = np.array([row1, row2])\n",
    "\n",
    "row_labels = ['n =', '']\n",
    "summary_table = axis.table(cellText= cell_text,\n",
    "                           cellLoc='center',\n",
    "                           rowLabels=row_labels,\n",
    "                           rowLoc='center',\n",
    "                           colLoc='center'\n",
    "                          )\n",
    "\n",
    "summary_table.auto_set_font_size(False)\n",
    "summary_table.set_fontsize(11)\n",
    "\n",
    "properties = summary_table.properties()\n",
    "table_cells = properties['children']\n",
    "for cell in table_cells:\n",
    "    cell.set_height(0.12)\n",
    "    cell.set_alpha(0)\n",
    "    \n",
    "# Draw statistical results.\n",
    "for p, condition in enumerate(condition_order[1:]):\n",
    "    sig_height = 6 if (corrected_bouts_pvalues.get(condition, 'NaN') == 'NaN') or (corrected_bouts_pvalues.get(condition, 'NaN') >= 0.05) else 2\n",
    "    helpers.plot_stattest_result(ax=axis,\n",
    "                                 x1=p+1,\n",
    "                                 x2=p+1,\n",
    "                                 p_value=corrected_bouts_pvalues.get(condition, 'NaN'),\n",
    "                                 y=3.5,\n",
    "                                 ticksize=0,\n",
    "                                 xytext=(0,sig_height),\n",
    "                                 fontsize=13,\n",
    "                                 color=INK,\n",
    "                                 connector_color=INK\n",
    "                                )\n",
    "\n",
    "# Saving parameters.\n",
    "filename = 'nbouts_aggression_normalized_first_5mins_mating_drive'\n",
    "plt.savefig( os.path.join(savepath, filename))\n",
    "\n",
    "plt.show()\n",
    "plt.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  },
  "varInspector": {
   "cols": {
    "lenName": 16,
    "lenType": 16,
    "lenVar": 40
   },
   "kernels_config": {
    "python": {
     "delete_cmd_postfix": "",
     "delete_cmd_prefix": "del ",
     "library": "var_list.py",
     "varRefreshCmd": "print(var_dic_list())"
    },
    "r": {
     "delete_cmd_postfix": ") ",
     "delete_cmd_prefix": "rm(",
     "library": "var_list.r",
     "varRefreshCmd": "cat(var_dic_list()) "
    }
   },
   "types_to_exclude": [
    "module",
    "function",
    "builtin_function_or_method",
    "instance",
    "_Feature"
   ],
   "window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
